﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FoneBuddy.LinqModel.Data;

namespace FoneBuddy.LinqModel
{
    public partial class City
    {
        #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion

        public City(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public List<City> GetAllCity()
        {
            return _dataObject.GetAllCity();
        }
        public void Create()
        {
            _dataObject.CreateCity(this);
        }
        public void Delete()
        {
            _dataObject.DeleteCity(this);
        }
        public void GetCityById()
        {
            _dataObject.GetCityById(this);
        }
        public void Update()
        {
            _dataObject.UpdateCity(this);
        }
        public void GetCityByName()
        {
            _dataObject.GetCityByName(this);
        }
        public List<City> GetCityByStateId()
        {
          return   _dataObject.GetCityByStateId(this);
        }
    }
}
